<template>
    <div class="recommend">
        <div class="recommend-item" v-for='(item,index) in recommends' :key='index'>
            <a :href="item.link">
                <img :src="item.image" alt="">
            </a>
            <a :href="item.link" class="title">
                {{item.title}}
            </a>
        </div>
    </div>
</template>

<script>
export default {
    name:'HomeRecommend',
    props:{
        recommends:{
            type:Array
        }
    }
}
</script>

<style>
.recommend {
    display: flex;
    width: 100%;
    text-align: center;
    padding: 10px 0 20px;
    border-bottom: 8px solid #eee;
}
.recommend-item {
    flex: 1;
    width: 25%;
}
.recommend-item img {
    width: 80%;
}
.title {
    display: block;
    font-size: 14px;
    margin-top: 8px;
}
</style>